package lyj.springcloud.service.impl;

import lyj.springcloud.service.ThreadPoolService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class ThreadPoolServiceImpl implements ThreadPoolService {

    /**
     * 测试异步编排调用
     */
    @Async("asynaPaymentExecutor")
    @Override
    public void asyncPayment() throws InterruptedException {
        // 模拟业务执行
        Thread.sleep(2000);

        System.out.println("业务正在执行 。。。。。。。");
    }
}
